package com.marvels.approve.common.service;

import java.io.IOException;
import java.util.List;

import org.springframework.web.multipart.MultipartFile;

import com.marvels.approve.credit.dto.McamAttachmentInfoDTO;
import com.marvels.approve.process.dto.LaAttachAtmeTypeViewDTO;
import com.marvels.common.exception.MarvelsBusinessException;

/**
 * 上传附件公共类
 * @author zhaosa
 *
 */
public interface IUploadFileService {
	
	/**
	 * 上传附件
	 * @param file
	 * 文件
	 * @param loanId
	 * 借据号
	 * @param supportType
	 * 支持的文件类型
	 * @return
	 * @throws MarvelsBusinessException
	 * @throws IOException 
	 */
	public Integer uploadFile(MultipartFile file, String loanId,List<String> supportType,McamAttachmentInfoDTO attachment) throws MarvelsBusinessException, IOException;
	
	/**
	 * 获取当前支持的所有类型的附件信息
	 * @param viewType
	 * @param loanId
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public List<LaAttachAtmeTypeViewDTO> getAttachmentsByViewKey(String viewType, String loanId) throws MarvelsBusinessException;
	
}
